<?php
use Buan\UrlCommand;
?>
<div class="head">
	<h1>Template Editor</h1>
</div>

<table class="list">
	<thead>
		<tr>
			<th>Template name</th>
			<th>Type</th>
			<th>&#160;</th>
		</tr>
	</thead>
	<tbody>
	<?php foreach($templates as $tpl): ?>
		<tr>
			<td><?php $this->html->e($tpl->getTitle()); ?></td>
			<td><?php $this->html->e($tpl->getType()===ScribbleTemplate::TYPE_OUTER ? 'Outer' : 'Inner'); ?></td>
			<td><a href="<?php $this->html->eUrl(UrlCommand::createUrl('sp-template-editor', $tpl->name)); ?>">edit</a></td>
		</tr>
	<?php endforeach; ?>
	</tbody>
</table>